<%@page import="lbsproject.processaudit.model.Worker"%>
<%@page import="java.util.List"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>巡检项目任务管理</title>
<link href="css/global.css" type="text/css" rel="stylesheet"/>
<script type="text/javascript" src="js/jquery1.4.4.js"></script>
<script type="text/javascript" src="js/global.js"></script>
<!-- <script type="text/javascript" src="http://api.map.baidu.com/api?v=1.2"></script> -->
</head>
<body>
	<jsp:include page="WEB-INF/template/header.jsp">
		<jsp:param value="current" name="personManage"/>
	</jsp:include>
	<div id="container" class="section">
		<div class="main">
			本页展示所有员工信息。
			<ul>
				<li>点击“执行记录”可以获取此人的任务执行记录。</li>
				<li>点击“修改”可以对员工信息进行修改。</li>
			</ul>
			<p align="center"><strong class="title" >&nbsp;已有人员&nbsp; </strong></p>
			<div class="blank"></div>
			<!-- show existed work regions -->
			<div>
				<table class="table">
					<thead>
						<tr>
							<th width="20%">名字</th>
							<th width="20%">密码</th>
							<th width="20%">岗位</th>
							<th width="20%">联系方式</th>
							<th width="20%">操作</th>
						</tr>
					</thead>
					<tbody>
					<%
					@SuppressWarnings("unchecked")
					List<Worker> workers  = 
						(List<Worker>)request.getAttribute("allWorkers");
					if (workers  != null) {
						for (Worker w: workers) {
					%>
						<tr>
							<td><%=w.getName() %></td>
							<td><%=w.getPassword() %></td>
							<td><%=w.getPosition().getPositionName() %></td>
							<td><%=w.getContact() %></td>
							<td><a href="ShowWorkers?mode=edit&id=<%=w.getWorkerID() %>">修改</a>&nbsp;<a href="QueryTaskExecution?worker=<%=w.getWorkerID() %>&type=ALL&queryType=recordByPerson">执行记录</a></td>
						</tr>
					<%
						}
					}
					%>
					</tbody>
				</table>
			</div>
		</div>
		<div class="aside"> 
			<ul class="side-nav">
				<li class="nav-item"><a id="side-nav-1" class="nav-base" href="personManage.jsp"><b>人员位置</b><em></em></a></li>
				<li class="nav-item"><a id="side-nav-1" class="nav-base" href="ShowExeRecordOfOneWorker"><b>执行记录</b><em></em></a></li>
				<li class="nav-item"><a id="side-nav-2" class="nav-base" href="ShowWorkers?mode=add"><b>新增人员</b><em></em></a></li>
				<li class="nav-item high-light"><a id="side-nav-3" class="nav-base" href=""><b>人员信息维护</b><em></em></a>
				</li>
			</ul>
		</div>
		<div class="clear"></div>
	</div>
	<jsp:include page="WEB-INF/template/footer.jsp"></jsp:include>
</body>
</html>